Skip to content

gh-149701: Fully silence potential hash -r error#149702

Merged
vsajip merged 4 commits into
python:mainfrom
genericallyterrible:venv_activate
May 13, 2026
Merged

gh-149701: Fully silence potential hash -r error#149702
vsajip merged 4 commits into
python:mainfrom
genericallyterrible:venv_activate

Conversation

@genericallyterrible
Copy link
Copy Markdown
Contributor

@genericallyterrible genericallyterrible commented May 12, 2026

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 12, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented May 12, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

Copy link
Copy Markdown

@sepehr-rs sepehr-rs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Debian 13, can confirm this fix works.

bash-5.2$ set +h
bash-5.2$ hash
bash: hash: hashing disabled
bash-5.2$ source .venv/bin/activate
(.venv) bash-5.2$ echo $?
0

@genericallyterrible
Copy link
Copy Markdown
Contributor Author

After digging, seems the same thing happened previously in virtualenv: pypa/virtualenv#2717

New here so I'm not sure if tests may need updated to watch for regressions.

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 12, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@zware
Copy link
Copy Markdown
Member

zware commented May 12, 2026

Yes, I think this is worth adding a test along the lines of what was done in the virtualenv change.

Copy link
Copy Markdown
Member

@vsajip vsajip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per @zware's comment, I agree that a test should be added.

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 12, 2026

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@genericallyterrible
Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

I copied the preceding test, test_deactivate_with_strict_bash_opts, and added set +h before the source command.

Sorry for the noise, I mistakenly merged main through github instead of rebasing my commits locally.

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 12, 2026

Thanks for making the requested changes!

@vsajip: please review the changes made to this pull request.

@bedevere-app bedevere-app Bot requested a review from vsajip May 12, 2026 19:57
Copy link
Copy Markdown
Member

@zware zware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vsajip vsajip merged commit cd60968 into python:main May 13, 2026
57 of 60 checks passed
@vsajip vsajip added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels May 13, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @genericallyterrible for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app
Copy link
Copy Markdown

Thanks @genericallyterrible for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link
Copy Markdown

Thanks @genericallyterrible for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 13, 2026

GH-149757 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 13, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 13, 2026

GH-149758 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 13, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 13, 2026

GH-149759 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 13, 2026
@genericallyterrible genericallyterrible deleted the venv_activate branch May 13, 2026 08:01
vsajip pushed a commit that referenced this pull request May 13, 2026
vsajip pushed a commit that referenced this pull request May 13, 2026
vsajip pushed a commit that referenced this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants